<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SPHinXsys: SPHINXsys/src/shared/meshes/mesh_with_data_packages.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SPHinXsys
   &#160;<span id="projectnumber">alpha version</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_3dc1dabd28ba78e072d14d3fcfc90454.html">SPHINXsys</a></li><li class="navelem"><a class="el" href="dir_48ea983704c43b6d88c1fa3f4d09e369.html">src</a></li><li class="navelem"><a class="el" href="dir_0a0d9ef1793521534f0094f317758287.html">shared</a></li><li class="navelem"><a class="el" href="dir_61d72b4dd46479d55af927dc89c7a78c.html">meshes</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">mesh_with_data_packages.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* -------------------------------------------------------------------------*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">*                               SPHinXsys                                   *</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">* --------------------------------------------------------------------------*</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">* SPHinXsys (pronunciation: s&#39;finksis) is an acronym from Smoothed Particle *</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">* Hydrodynamics for industrial compleX systems. It provides C++ APIs for    *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">* physical accurate simulation and aims to model coupled industrial dynamic *</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">* systems including fluid, solid, multi-body dynamics and beyond with SPH   *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">* (smoothed particle hydrodynamics), a meshless computational method using  *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">* particle discretization.                                                  *</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">*                                                                           *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">* SPHinXsys is partially funded by German Research Foundation               *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">* (Deutsche Forschungsgemeinschaft) DFG HU1527/6-1, HU1527/10-1             *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">* and HU1527/12-1.                                                          *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">*                                                                           *</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">* Portions copyright (c) 2017-2020 Technical University of Munich and       *</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">* the authors&#39; affiliations.                                                *</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">*                                                                           *</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">* Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may   *</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">* not use this file except in compliance with the License. You may obtain a *</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">* copy of the License at http://www.apache.org/licenses/LICENSE-2.0.        *</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">*                                                                           *</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">* --------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="base__mesh_8h.html">base_mesh.h</a>&quot;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;my_memory_pool.h&quot;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &lt;fstream&gt;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &lt;mutex&gt;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">using namespace </span>std::placeholders;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_s_p_h.html">SPH</a></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;{</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">class </span>Kernel;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> ReturnType, <span class="keyword">class</span> DataPackageType&gt;</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="namespace_s_p_h.html#ae4ae5c55d688fbb13bd48ef45fb27f05">   51</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="namespace_s_p_h.html#ae4ae5c55d688fbb13bd48ef45fb27f05">PackageFunctor</a> = std::function&lt;ReturnType(DataPackageType*, Real)&gt;;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> DataPackageType&gt;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="namespace_s_p_h.html#a84524176cb12db9469ff52f54551a263">   54</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="namespace_s_p_h.html#a84524176cb12db9469ff52f54551a263">PackageIterator</a>(<a class="code" href="namespace_s_p_h.html#adedcef5c2d6a5ee133747acd23880415">ConcurrentVector&lt;DataPackageType*&gt;</a> data_pkgs,</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <a class="code" href="namespace_s_p_h.html#ae4ae5c55d688fbb13bd48ef45fb27f05">PackageFunctor&lt;void, DataPackageType&gt;</a>&amp; pkg_functor, Real dt = 0.0)</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    {</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i != data_pkgs.size(); ++i)</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;            pkg_functor(data_pkgs[i], dt);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    };</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> DataPackageType&gt;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="namespace_s_p_h.html#a3e5aada71d1bfd8a3891284e11012696">   63</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="namespace_s_p_h.html#a3e5aada71d1bfd8a3891284e11012696">PackageIterator_parallel</a>(<a class="code" href="namespace_s_p_h.html#adedcef5c2d6a5ee133747acd23880415">ConcurrentVector&lt;DataPackageType*&gt;</a> data_pkgs,</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <a class="code" href="namespace_s_p_h.html#ae4ae5c55d688fbb13bd48ef45fb27f05">PackageFunctor&lt;void, DataPackageType&gt;</a>&amp; pkg_functor, Real dt = 0.0)</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        parallel_for(blocked_range&lt;size_t&gt;(0, data_pkgs.size()),</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            [&amp;](<span class="keyword">const</span> blocked_range&lt;size_t&gt;&amp; r) {</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                for (size_t i = r.begin(); i != r.end(); ++i) {</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                    pkg_functor(data_pkgs[i], dt);</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                }</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;            }, ap);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    };</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> ReturnType, <span class="keyword">typename</span> ReduceOperation, <span class="keyword">class</span> DataPackageType&gt;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="namespace_s_p_h.html#a87726845c1aa9f94479e95a833998d66">   75</a></span>&#160;    ReturnType <a class="code" href="namespace_s_p_h.html#a87726845c1aa9f94479e95a833998d66">ReducePackageIterator</a>(<a class="code" href="namespace_s_p_h.html#adedcef5c2d6a5ee133747acd23880415">ConcurrentVector&lt;DataPackageType*&gt;</a> data_pkgs, ReturnType temp,</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <a class="code" href="namespace_s_p_h.html#ae4ae5c55d688fbb13bd48ef45fb27f05">PackageFunctor&lt;ReturnType, DataPackageType&gt;</a>&amp; reduce_pkg_functor, ReduceOperation&amp; reduce_operation, Real dt = 0.0)</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; data_pkgs.size(); ++i)</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            temp = reduce_operation(temp, reduce_pkg_functor(data_pkgs[i], dt));</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keywordflow">return</span> temp;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    };</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> ReturnType, <span class="keyword">typename</span> ReduceOperation, <span class="keyword">class</span> DataPackageType&gt;</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="namespace_s_p_h.html#aeff12fb47a2effd84999abe04ca059bd">   86</a></span>&#160;    ReturnType <a class="code" href="namespace_s_p_h.html#aeff12fb47a2effd84999abe04ca059bd">ReducePackageIterator_parallel</a>(<a class="code" href="namespace_s_p_h.html#adedcef5c2d6a5ee133747acd23880415">ConcurrentVector&lt;DataPackageType*&gt;</a> data_pkgs, ReturnType temp,</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <a class="code" href="namespace_s_p_h.html#ae4ae5c55d688fbb13bd48ef45fb27f05">PackageFunctor&lt;ReturnType, DataPackageType&gt;</a>&amp; reduce_pkg_functor, ReduceOperation&amp; reduce_operation, Real dt = 0.0) {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keywordflow">return</span> parallel_reduce(blocked_range&lt;size_t&gt;(0, data_pkgs.size()),</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;            temp, [&amp;](<span class="keyword">const</span> blocked_range&lt;size_t&gt;&amp; r, ReturnType temp0)-&gt;ReturnType</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            {</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                for (size_t i = r.begin(); i != r.end(); ++i) {</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                    temp0 = reduce_operation(temp, reduce_pkg_functor(data_pkgs[i], dt));</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                }</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                <span class="keywordflow">return</span> temp0;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            },</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            [&amp;](ReturnType x, ReturnType y)-&gt;ReturnType {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                <span class="keywordflow">return</span> reduce_operation(x, y);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            );</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    };</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keyword">template</span>&lt;<span class="keywordtype">int</span> PKG_SIZE, <span class="keywordtype">int</span> ADDRS_SIZE&gt;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_base_data_package.html">  109</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_s_p_h_1_1_base_data_package.html">BaseDataPackage</a> : <span class="keyword">public</span> <a class="code" href="class_s_p_h_1_1_base_mesh.html">BaseMesh</a></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    {</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_base_data_package.html#af0bb3736a1690361c143004d97df5982">  112</a></span>&#160;        Vecd <a class="code" href="class_s_p_h_1_1_base_data_package.html#af0bb3736a1690361c143004d97df5982">data_lower_bound_</a>; </div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_base_data_package.html#a4ecdb2f7cef628600fdeb5c847f16ec0">  113</a></span>&#160;        <a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> <a class="code" href="class_s_p_h_1_1_base_data_package.html#a4ecdb2f7cef628600fdeb5c847f16ec0">pkg_index_</a>;    </div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_base_data_package.html#a1ce05b6dda6fbc903e2ede9e71d8862b">  114</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_s_p_h_1_1_base_data_package.html#a1ce05b6dda6fbc903e2ede9e71d8862b">is_inner_pkg_</a>; </div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataType&gt;</div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_base_data_package.html#a533e964fd9ae146194533f7457cfc77b">  117</a></span>&#160;        <span class="keyword">using</span> <a class="code" href="class_s_p_h_1_1_base_data_package.html#a533e964fd9ae146194533f7457cfc77b">PackageData</a> = PackageDataMatrix&lt;DataType, PKG_SIZE&gt;;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataType&gt;</div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_base_data_package.html#a78749e0cfc7e90525a72781510ebc3d5">  120</a></span>&#160;        <span class="keyword">using</span> <a class="code" href="class_s_p_h_1_1_base_data_package.html#a78749e0cfc7e90525a72781510ebc3d5">PackageDataAddress</a> = PackageDataMatrix&lt;DataType*, ADDRS_SIZE&gt;;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataType&gt;</div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_base_data_package.html#a1e7c2c1642340712061e846748cdf561">  123</a></span>&#160;        <span class="keyword">using</span> <a class="code" href="class_s_p_h_1_1_base_data_package.html#a1e7c2c1642340712061e846748cdf561">PackageTemporaryData</a> = PackageDataMatrix&lt;DataType, ADDRS_SIZE&gt;;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <a class="code" href="class_s_p_h_1_1_base_data_package.html">BaseDataPackage</a>() : <a class="code" href="class_s_p_h_1_1_base_mesh.html">BaseMesh</a>(<a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a>(ADDRS_SIZE)), </div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            data_lower_bound_(0), pkg_index_(0), is_inner_pkg_(false) {};</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <span class="keyword">virtual</span> ~<a class="code" href="class_s_p_h_1_1_base_data_package.html">BaseDataPackage</a>() {};</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        constexpr <span class="keywordtype">int</span> PackageSize() { <span class="keywordflow">return</span> PKG_SIZE; };</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        constexpr <span class="keywordtype">int</span> AddressSize() { <span class="keywordflow">return</span> ADDRS_SIZE; };</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        constexpr <span class="keywordtype">int</span> AddressBufferWidth() { <span class="keywordflow">return</span> (ADDRS_SIZE - PKG_SIZE) / 2; };</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        constexpr <span class="keywordtype">int</span> OperationUpperBound() { <span class="keywordflow">return</span> PKG_SIZE + AddressBufferWidth(); };</div>
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_base_data_package.html#a90485a8cedc9c192ea2cba1e7f09abea">  134</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_base_data_package.html#a90485a8cedc9c192ea2cba1e7f09abea">initializePackageGeometry</a>(Vecd&amp; pkg_lower_bound, Real data_spacing) {</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;            mesh_lower_bound_ = pkg_lower_bound - Vecd(data_spacing * 0.5);;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            grid_spacing_ = data_spacing;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            data_lower_bound_ = pkg_lower_bound + Vecd(data_spacing * 0.5);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        };</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataType&gt;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        DataType probeDataPackage(PackageDataAddress&lt;DataType&gt;&amp; pkg_data_addrs, <span class="keyword">const</span> Vecd&amp; position);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> InDataType, <span class="keyword">typename</span> OutDataType&gt;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordtype">void</span> computeGradient(PackageDataAddress&lt;InDataType&gt;&amp; in_pkg_data_addrs,</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            PackageDataAddress&lt;OutDataType&gt; out_pkg_data_addrs, Real dt = 0.0);</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> InDataType, <span class="keyword">typename</span> OutDataType&gt;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordtype">void</span> computeNormalizedGradient(PackageDataAddress&lt;InDataType&gt;&amp; in_pkg_data_addrs,</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;            PackageDataAddress&lt;OutDataType&gt; out_pkg_data_addrs, Real dt = 0.0);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataType&gt;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keywordtype">void</span> initializePackageDataAddress(PackageData&lt;DataType&gt;&amp; pkg_data, </div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;            PackageDataAddress&lt;DataType&gt;&amp; pkg_data_addrs);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataType&gt;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        <span class="keywordtype">void</span> assignPackageDataAddress(PackageDataAddress&lt;DataType&gt;&amp; pkg_data_addrs, <a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a>&amp; addrs_index,</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            PackageData&lt;DataType&gt;&amp; pkg_data, <a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a>&amp; data_index);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataType&gt;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        DataType CornerAverage(PackageDataAddress&lt;DataType&gt;&amp; pkg_data_addrs, <a class="code" href="class_s_p_h_1_1_s_vec.html">Veci</a> addrs_index, <a class="code" href="class_s_p_h_1_1_s_vec.html">Veci</a> corner_direction);</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    };</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160; </div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> BaseMeshType, <span class="keyword">class</span> DataPackageType&gt;</div>
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html">  170</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html">MeshWithDataPackages</a> : <span class="keyword">public</span> <a class="code" href="class_base_mesh_type.html">BaseMeshType</a></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    {</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#af503414d80db34f5853beb37c7c32e12">  173</a></span>&#160;        <a class="code" href="class_my_memory_pool.html">MyMemoryPool&lt;DataPackageType&gt;</a> <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#af503414d80db34f5853beb37c7c32e12">data_pkg_pool_</a>;        </div>
<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#a60367a8dbbe1def71a561f0ef1c8dca0">  174</a></span>&#160;        MeshDataMatrix&lt;DataPackageType*&gt; <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#a60367a8dbbe1def71a561f0ef1c8dca0">data_pkg_addrs_</a>;    </div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#aa87f20b6d7a431a3afcc3cd6e2cf8a80">  175</a></span>&#160;        <a class="code" href="namespace_s_p_h.html#adedcef5c2d6a5ee133747acd23880415">ConcurrentVector&lt;DataPackageType*&gt;</a> <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#aa87f20b6d7a431a3afcc3cd6e2cf8a80">inner_data_pkgs_</a>; </div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> allocateMeshDataMatrix() <span class="keyword">override</span>; </div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> deleteMeshDataMatrix() <span class="keyword">override</span>;   </div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">class</span> MeshCompositionType&gt;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="keyword">explicit</span> <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html">MeshWithDataPackages</a>(MeshCompositionType&amp; mesh_composition, <a class="code" href="class_s_p_h_1_1_particle_adaptation.html">ParticleAdaptation</a>&amp; particle_adaptation,</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            <a class="code" href="namespace_s_p_h.html#ad185cdeb05bdee76bf975cc50f1c15b7">BoundingBox</a> tentative_bounds, Real data_spacing, <span class="keywordtype">size_t</span> buffer_width) :</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            <a class="code" href="class_base_mesh_type.html">BaseMeshType</a>(mesh_composition, particle_adaptation, tentative_bounds, data_spacing, buffer_width),</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            data_spacing_(data_spacing), </div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;            pkg_size_((<a class="code" href="classint.html">int</a>)DataPackageType().PackageSize()),</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            pkg_addrs_buffer_((<a class="code" href="classint.html">int</a>)DataPackageType().AddressBufferWidth()),</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;            pkg_operations_(pkg_size_ + pkg_addrs_buffer_),</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;            pkg_addrs_size_(pkg_size_ + 2 * pkg_addrs_buffer_),</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;            total_data_points_(this-&gt;number_of_cells_ * pkg_size_)</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        {</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;            allocateMeshDataMatrix();</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        };</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        <span class="keyword">virtual</span> ~<a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html">MeshWithDataPackages</a>() { deleteMeshDataMatrix(); };</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160; </div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">class</span> DataType, <span class="keyword">typename</span> PackageDataAddressType, PackageDataAddressType DataPackageType:: * MemPtr&gt;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        DataType probeMesh(<span class="keyword">const</span> <a class="code" href="class_vecd.html">Vecd</a>&amp; position);</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#a7547ab2f45b7be609ec58b2b14d2736f">  199</a></span>&#160;        Real <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#a7547ab2f45b7be609ec58b2b14d2736f">data_spacing_</a>; </div>
<div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#a265af047a587520b5f34f96f55324007">  200</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#a265af047a587520b5f34f96f55324007">pkg_size_</a>; </div>
<div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#af78347a7adfc754cd602345d6e8c9ecc">  201</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#af78347a7adfc754cd602345d6e8c9ecc">pkg_addrs_buffer_</a>; </div>
<div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#aad654e0b2448c5eb98b363c851949eb6">  202</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#aad654e0b2448c5eb98b363c851949eb6">pkg_operations_</a>; </div>
<div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#a10eb97e684fb202435b59cce6835d732">  203</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#a10eb97e684fb202435b59cce6835d732">pkg_addrs_size_</a>; </div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#ae42076e109fde0b25009c724928ae221">  204</a></span>&#160;        <a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#ae42076e109fde0b25009c724928ae221">total_data_points_</a>; </div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#aa42ed9e23fbe9af25127ca9b0af47820">  205</a></span>&#160;        StdVec&lt;DataPackageType*&gt; <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#aa42ed9e23fbe9af25127ca9b0af47820">singular_data_pkgs_addrs</a>; </div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#a39bd46ee9a77717918fdc71d98d50ddf">  206</a></span>&#160;        std::mutex <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#a39bd46ee9a77717918fdc71d98d50ddf">mutex_my_pool</a>;   </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> initializeDataInACell(<a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> cell_index, Real dt) = 0;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> initializeAddressesInACell(<a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> cell_index, Real dt) = 0;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> tagACellIsInnerPackage(<a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> cell_index, Real dt) = 0;</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> initializeDataPackages() = 0;</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160; </div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;        <span class="comment">/*find the data index global index from its position*/</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> DataGlobalIndexFromPosition(Vecd position)</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        {</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;            Vecd rltpos(0);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;            <a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> data_global_index(0);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> n = 0; n &lt; rltpos.size(); n++)</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            {</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                rltpos[n] = position[n] - this-&gt;mesh_lower_bound_[n] - 0.5 * data_spacing_;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;                data_global_index[n] = clamp((<span class="keywordtype">int</span>)floor(rltpos[n] / data_spacing_),</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;                    0, <span class="keywordtype">int</span>(total_data_points_[n]) - 1);</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            }</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            <span class="keywordflow">return</span> data_global_index;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        }</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160; </div>
<div class="line"><a name="l00230"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#a856867d209a70e80c5edd0f41713e2da">  230</a></span>&#160;        Vecd <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#a856867d209a70e80c5edd0f41713e2da">DataPositionFromGlobalIndex</a>(<a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> global_data_index)</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;        {</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;            Vecd data_position;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> n = 0; n &lt; data_position.size(); n++)</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;            {</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;                data_position[n] = this-&gt;mesh_lower_bound_[n] + 0.5 * data_spacing_</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                    + Real(global_data_index[n]) * data_spacing_;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;            }</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;            <span class="keywordflow">return</span> data_position;</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        };</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> DataType, <span class="keyword">typename</span> PackageDataType, PackageDataType DataPackageType:: *MemPtr&gt;</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        DataType DataValueFromGlobalIndex(<a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> global_data_index);</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;        <span class="keywordtype">void</span> initializePackageAddressesInACell(<a class="code" href="class_s_p_h_1_1_s_vec.html">Vecu</a> cell_index);</div>
<div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_mesh_with_data_packages.html#a93c1a8b5e30f402b5e1e5439f43936a1">  245</a></span>&#160;        std::pair&lt;int, int&gt; <a class="code" href="class_s_p_h_1_1_mesh_with_data_packages.html#a93c1a8b5e30f402b5e1e5439f43936a1">CellShiftAndDataIndex</a>(<span class="keywordtype">int</span> data_addrs_index_component)</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        {</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            std::pair&lt;int, int&gt; shift_and_index;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            <span class="keywordtype">int</span> signed_date_index = data_addrs_index_component - pkg_addrs_buffer_;</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;            shift_and_index.first = (signed_date_index + pkg_size_) / pkg_size_ - 1;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;            shift_and_index.second = signed_date_index - shift_and_index.first * pkg_size_;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;            <span class="keywordflow">return</span> shift_and_index;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        }</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    };</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_a93c1a8b5e30f402b5e1e5439f43936a1"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#a93c1a8b5e30f402b5e1e5439f43936a1">SPH::MeshWithDataPackages::CellShiftAndDataIndex</a></div><div class="ttdeci">std::pair&lt; int, int &gt; CellShiftAndDataIndex(int data_addrs_index_component)</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:245</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_particle_adaptation_html"><div class="ttname"><a href="class_s_p_h_1_1_particle_adaptation.html">SPH::ParticleAdaptation</a></div><div class="ttdoc">Base class for particle adaptation The base class defined essential global parameteres....</div><div class="ttdef"><b>Definition:</b> particle_adaptation.h:52</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_aa42ed9e23fbe9af25127ca9b0af47820"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#aa42ed9e23fbe9af25127ca9b0af47820">SPH::MeshWithDataPackages::singular_data_pkgs_addrs</a></div><div class="ttdeci">StdVec&lt; DataPackageType * &gt; singular_data_pkgs_addrs</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:205</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_base_data_package_html"><div class="ttname"><a href="class_s_p_h_1_1_base_data_package.html">SPH::BaseDataPackage</a></div><div class="ttdoc">Abstract base class for a data package which is given by a small mesh patch. note tha ADDRS_SIZE = PK...</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:109</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_aad654e0b2448c5eb98b363c851949eb6"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#aad654e0b2448c5eb98b363c851949eb6">SPH::MeshWithDataPackages::pkg_operations_</a></div><div class="ttdeci">int pkg_operations_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:202</div></div>
<div class="ttc" id="aclass_base_mesh_type_html"><div class="ttname"><a href="class_base_mesh_type.html">BaseMeshType</a></div></div>
<div class="ttc" id="aclass_vecd_html"><div class="ttname"><a href="class_vecd.html">Vecd</a></div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html">SPH::MeshWithDataPackages</a></div><div class="ttdoc">Abstract class fpr mesh with data packages.</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:170</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_base_data_package_html_a1e7c2c1642340712061e846748cdf561"><div class="ttname"><a href="class_s_p_h_1_1_base_data_package.html#a1e7c2c1642340712061e846748cdf561">SPH::BaseDataPackage&lt; 4, 6 &gt;::PackageTemporaryData</a></div><div class="ttdeci">PackageDataMatrix&lt; DataType, ADDRS_SIZE &gt; PackageTemporaryData</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:123</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_a10eb97e684fb202435b59cce6835d732"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#a10eb97e684fb202435b59cce6835d732">SPH::MeshWithDataPackages::pkg_addrs_size_</a></div><div class="ttdeci">int pkg_addrs_size_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:203</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_a39bd46ee9a77717918fdc71d98d50ddf"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#a39bd46ee9a77717918fdc71d98d50ddf">SPH::MeshWithDataPackages::mutex_my_pool</a></div><div class="ttdeci">std::mutex mutex_my_pool</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:206</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_base_data_package_html_a78749e0cfc7e90525a72781510ebc3d5"><div class="ttname"><a href="class_s_p_h_1_1_base_data_package.html#a78749e0cfc7e90525a72781510ebc3d5">SPH::BaseDataPackage&lt; 4, 6 &gt;::PackageDataAddress</a></div><div class="ttdeci">PackageDataMatrix&lt; DataType *, ADDRS_SIZE &gt; PackageDataAddress</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:120</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_base_data_package_html_a90485a8cedc9c192ea2cba1e7f09abea"><div class="ttname"><a href="class_s_p_h_1_1_base_data_package.html#a90485a8cedc9c192ea2cba1e7f09abea">SPH::BaseDataPackage::initializePackageGeometry</a></div><div class="ttdeci">void initializePackageGeometry(Vecd &amp;pkg_lower_bound, Real data_spacing)</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:134</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_ae42076e109fde0b25009c724928ae221"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#ae42076e109fde0b25009c724928ae221">SPH::MeshWithDataPackages::total_data_points_</a></div><div class="ttdeci">Vecu total_data_points_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:204</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_a60367a8dbbe1def71a561f0ef1c8dca0"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#a60367a8dbbe1def71a561f0ef1c8dca0">SPH::MeshWithDataPackages::data_pkg_addrs_</a></div><div class="ttdeci">MeshDataMatrix&lt; DataPackageType * &gt; data_pkg_addrs_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:174</div></div>
<div class="ttc" id="anamespace_s_p_h_html_ae4ae5c55d688fbb13bd48ef45fb27f05"><div class="ttname"><a href="namespace_s_p_h.html#ae4ae5c55d688fbb13bd48ef45fb27f05">SPH::PackageFunctor</a></div><div class="ttdeci">std::function&lt; ReturnType(DataPackageType *, Real)&gt; PackageFunctor</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:51</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_base_data_package_html_a4ecdb2f7cef628600fdeb5c847f16ec0"><div class="ttname"><a href="class_s_p_h_1_1_base_data_package.html#a4ecdb2f7cef628600fdeb5c847f16ec0">SPH::BaseDataPackage::pkg_index_</a></div><div class="ttdeci">Vecu pkg_index_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:113</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_af78347a7adfc754cd602345d6e8c9ecc"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#af78347a7adfc754cd602345d6e8c9ecc">SPH::MeshWithDataPackages::pkg_addrs_buffer_</a></div><div class="ttdeci">int pkg_addrs_buffer_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:201</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_af503414d80db34f5853beb37c7c32e12"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#af503414d80db34f5853beb37c7c32e12">SPH::MeshWithDataPackages::data_pkg_pool_</a></div><div class="ttdeci">MyMemoryPool&lt; DataPackageType &gt; data_pkg_pool_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:173</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_base_data_package_html_a533e964fd9ae146194533f7457cfc77b"><div class="ttname"><a href="class_s_p_h_1_1_base_data_package.html#a533e964fd9ae146194533f7457cfc77b">SPH::BaseDataPackage&lt; 4, 6 &gt;::PackageData</a></div><div class="ttdeci">PackageDataMatrix&lt; DataType, PKG_SIZE &gt; PackageData</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:117</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_base_data_package_html_af0bb3736a1690361c143004d97df5982"><div class="ttname"><a href="class_s_p_h_1_1_base_data_package.html#af0bb3736a1690361c143004d97df5982">SPH::BaseDataPackage::data_lower_bound_</a></div><div class="ttdeci">Vecd data_lower_bound_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:112</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_base_data_package_html_a1ce05b6dda6fbc903e2ede9e71d8862b"><div class="ttname"><a href="class_s_p_h_1_1_base_data_package.html#a1ce05b6dda6fbc903e2ede9e71d8862b">SPH::BaseDataPackage::is_inner_pkg_</a></div><div class="ttdeci">bool is_inner_pkg_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:114</div></div>
<div class="ttc" id="anamespace_s_p_h_html_a87726845c1aa9f94479e95a833998d66"><div class="ttname"><a href="namespace_s_p_h.html#a87726845c1aa9f94479e95a833998d66">SPH::ReducePackageIterator</a></div><div class="ttdeci">ReturnType ReducePackageIterator(ConcurrentVector&lt; DataPackageType * &gt; data_pkgs, ReturnType temp, PackageFunctor&lt; ReturnType, DataPackageType &gt; &amp;reduce_pkg_functor, ReduceOperation &amp;reduce_operation, Real dt=0.0)</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:75</div></div>
<div class="ttc" id="abase__mesh_8h_html"><div class="ttname"><a href="base__mesh_8h.html">base_mesh.h</a></div><div class="ttdoc">This is the base classes of mesh, which describe ordered and indexed data sets. Depending on applicat...</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_a856867d209a70e80c5edd0f41713e2da"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#a856867d209a70e80c5edd0f41713e2da">SPH::MeshWithDataPackages::DataPositionFromGlobalIndex</a></div><div class="ttdeci">Vecd DataPositionFromGlobalIndex(Vecu global_data_index)</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:230</div></div>
<div class="ttc" id="anamespace_s_p_h_html_a84524176cb12db9469ff52f54551a263"><div class="ttname"><a href="namespace_s_p_h.html#a84524176cb12db9469ff52f54551a263">SPH::PackageIterator</a></div><div class="ttdeci">void PackageIterator(ConcurrentVector&lt; DataPackageType * &gt; data_pkgs, PackageFunctor&lt; void, DataPackageType &gt; &amp;pkg_functor, Real dt=0.0)</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:54</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_base_mesh_html"><div class="ttname"><a href="class_s_p_h_1_1_base_mesh.html">SPH::BaseMesh</a></div><div class="ttdoc">Base class for all meshes.</div><div class="ttdef"><b>Definition:</b> base_mesh.h:62</div></div>
<div class="ttc" id="anamespace_s_p_h_html_aeff12fb47a2effd84999abe04ca059bd"><div class="ttname"><a href="namespace_s_p_h.html#aeff12fb47a2effd84999abe04ca059bd">SPH::ReducePackageIterator_parallel</a></div><div class="ttdeci">ReturnType ReducePackageIterator_parallel(ConcurrentVector&lt; DataPackageType * &gt; data_pkgs, ReturnType temp, PackageFunctor&lt; ReturnType, DataPackageType &gt; &amp;reduce_pkg_functor, ReduceOperation &amp;reduce_operation, Real dt=0.0)</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:86</div></div>
<div class="ttc" id="anamespace_s_p_h_html_adedcef5c2d6a5ee133747acd23880415"><div class="ttname"><a href="namespace_s_p_h.html#adedcef5c2d6a5ee133747acd23880415">SPH::ConcurrentVector</a></div><div class="ttdeci">LargeVec&lt; DataType &gt; ConcurrentVector</div><div class="ttdef"><b>Definition:</b> sph_data_conainers.h:51</div></div>
<div class="ttc" id="anamespace_s_p_h_html_ad185cdeb05bdee76bf975cc50f1c15b7"><div class="ttname"><a href="namespace_s_p_h.html#ad185cdeb05bdee76bf975cc50f1c15b7">SPH::BoundingBox</a></div><div class="ttdeci">std::pair&lt; Vecd, Vecd &gt; BoundingBox</div><div class="ttdef"><b>Definition:</b> sph_data_conainers.h:19</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_a7547ab2f45b7be609ec58b2b14d2736f"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#a7547ab2f45b7be609ec58b2b14d2736f">SPH::MeshWithDataPackages::data_spacing_</a></div><div class="ttdeci">Real data_spacing_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:199</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_aa87f20b6d7a431a3afcc3cd6e2cf8a80"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#aa87f20b6d7a431a3afcc3cd6e2cf8a80">SPH::MeshWithDataPackages::inner_data_pkgs_</a></div><div class="ttdeci">ConcurrentVector&lt; DataPackageType * &gt; inner_data_pkgs_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:175</div></div>
<div class="ttc" id="anamespace_s_p_h_html"><div class="ttname"><a href="namespace_s_p_h.html">SPH</a></div><div class="ttdef"><b>Definition:</b> solid_body_supplementary.cpp:9</div></div>
<div class="ttc" id="aclass_s_p_h_1_1_s_vec_html"><div class="ttname"><a href="class_s_p_h_1_1_s_vec.html">SPH::SVec</a></div><div class="ttdef"><b>Definition:</b> small_vectors.h:42</div></div>
<div class="ttc" id="anamespace_s_p_h_html_a3e5aada71d1bfd8a3891284e11012696"><div class="ttname"><a href="namespace_s_p_h.html#a3e5aada71d1bfd8a3891284e11012696">SPH::PackageIterator_parallel</a></div><div class="ttdeci">void PackageIterator_parallel(ConcurrentVector&lt; DataPackageType * &gt; data_pkgs, PackageFunctor&lt; void, DataPackageType &gt; &amp;pkg_functor, Real dt=0.0)</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:63</div></div>
<div class="ttc" id="aclass_my_memory_pool_html"><div class="ttname"><a href="class_my_memory_pool.html">MyMemoryPool&lt; DataPackageType &gt;</a></div></div>
<div class="ttc" id="aclassint_html"><div class="ttname"><a href="classint.html">int</a></div></div>
<div class="ttc" id="aclass_s_p_h_1_1_mesh_with_data_packages_html_a265af047a587520b5f34f96f55324007"><div class="ttname"><a href="class_s_p_h_1_1_mesh_with_data_packages.html#a265af047a587520b5f34f96f55324007">SPH::MeshWithDataPackages::pkg_size_</a></div><div class="ttdeci">int pkg_size_</div><div class="ttdef"><b>Definition:</b> mesh_with_data_packages.h:200</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
